cmake_minimum_required(VERSION 3.19)
project(RealTimeSpp)

set(CMAKE_CXX_STANDARD 14)

find_package(glog REQUIRED)
find_package(fmt REQUIRED)

include_directories(rtklib)
file(GLOB_RECURSE SOURCES rtklib/*.c rtklib/rcv/*.*)

add_executable(RealTimeSpp testRtSpp.cpp rt_spp.cpp ${SOURCES})
target_link_libraries(RealTimeSpp pthread glog fmt)

find_package(Python COMPONENTS Interpreter Development)
find_package(pybind11 CONFIG)

# pybind11 method:
pybind11_add_module(PySpp PySpp.cpp rt_spp.cpp ${SOURCES})


## Python method:
#find_package(pybind11 CONFIG REQUIRED)

# Create an extension module
#add_library(PySpp MODULE PySpp.cpp)
#target_link_libraries(PySpp PUBLIC pybind11::module pthread)